package com.audaque.springboot.foshanupload.casclientautoconfigsupport.controller;


import com.audaque.springboot.foshanupload.casclientautoconfigsupport.component.ServerUrlProvider;
import com.audaque.springboot.foshanupload.casclientautoconfigsupport.properties.ServerProperties;
import com.audaque.springboot.foshanupload.casclientautoconfigsupport.properties.ServiceProperties;
import com.audaque.springboot.foshanupload.authcore.model.currentUser.TransmittableThreadLocalCurrentUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/page")
@Slf4j
public class PageController {

    @Autowired
    private ServerUrlProvider serverUrlProvider;

    @Autowired
    private ServerProperties serverProperties;

    @Autowired
    private ServiceProperties serviceProperties;

    @RequestMapping(value = {"/", "/index"})
    public String index(HttpServletRequest request) {
        TransmittableThreadLocalCurrentUser currentUser = TransmittableThreadLocalCurrentUser.getCurrentUser();
        log.debug("currentUser:" + currentUser);
        return "index";
    }


}
